﻿using System;
using System.Diagnostics;

namespace problem_1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Project Euler - Problem #1");
            Console.WriteLine("Asserting Test Value.. (10 == 23)\r\n");
            var test = CalculateSumMultiples3And5(10);
            Debug.Assert(test == 23);

            var result = CalculateSumMultiples3And5(1000);
            Console.WriteLine(string.Format("Sum of Multiples of 3 and 5 Below 1000: {0}", result));
        }


        static int CalculateSumMultiples3And5(int belowValue)
        {
            var runningSum = 0;
            for (int i = 1; i < belowValue; ++i)
            {
                if ((i % 3 == 0) || (i % 5 == 0))
                    runningSum += i;
            }
            return runningSum;
        }
    }
}
